<?php
print _user_base_header_info();
?>


<div class="hp-tab-newprd upgrade-div">
    <p style="padding-left: 60px;font-weight: bold;color: #666;">温馨提示：<?php print render( $form['result']); ?></p>
</div>
<?php
global $user;
$user_info = _get_user_info($user->uid);
?>
    <div class="hp-tab-newprd upgrade-div">
        <p style="padding-left: 60px;font-weight: bold;color: #666;"></p>
        <div class="upgrade-btn-div">
            <?php
            if($user_info['role'] == "升级成农户"&&($user_info["status"]=="拒绝成农户" )){
            ?>
            <div class="registerbtn upgrade-align-div" ><input type="button" id='farmer-upgrade' value="升级成农户"/></div>
            <?php }else if($user_info['role'] == "升级成经销商"&&($user_info["status"]=="拒绝成经销商" )){
            ?>
            <div class="registerbtn upgrade-align-div" ><input type="button" id='distributor-upgrade' value="升级成经销商"/></div>
            <?php } ?>
        </div>

    </div>
    <br/><br/>

    <script>
        jQuery('#farmer-upgrade').click(function(){
            if(window.location.host == 'www.metercomm.com.cn'){
                window.location.href='/nonghua/account/upgrade/farmer';
            }else{
                window.location.href='/account/upgrade/farmer';
            }
        })
        jQuery('#distributor-upgrade').click(function(){
            if(window.location.host == 'www.metercomm.com.cn'){
                window.location.href='/nonghua/account/upgrade/distributor';
            }else{
                window.location.href='/account/upgrade/distributor';
            }
        })
    </script>



<?php print drupal_render_children($form); ?>


